package com.gaofeng.customviewdemo

import android.app.AlertDialog
import android.os.Bundle
import com.blankj.utilcode.util.ToastUtils
import com.gaofeng.customviewdemo.databinding.ActivityLifeLogBinding

class LifeLogActivity : BaseActivity() {

    private lateinit var binding: ActivityLifeLogBinding
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        binding = ActivityLifeLogBinding.inflate(layoutInflater)
        val rootView = binding.root
        setContentView(rootView)
        binding.btnShowToast.setOnClickListener {
            ToastUtils.showShort("toast")
        }
        binding.btnShowDialog.setOnClickListener {
            val alertDialog = AlertDialog.Builder(this@LifeLogActivity)
                .setTitle("alert title")
                .setOnCancelListener {
                }
                .create()
            alertDialog.show()
        }
    }
}